<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>up7-vue.js演示</title>
    <link rel="stylesheet" type="text/css" href="/static/up7/panel/up7.css" />
    <script type="text/javascript" src="/static/jquery-1.4.min.js"></script>
    <script type="text/javascript" src="/static/json2.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/vue.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/up7/up7.edge.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/up7/up7.app.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/up7/panel/up7.file.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/up7/panel/up7.folder.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/up7/panel/up7.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/up7/up7.vue.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/demo.js" charset="utf-8"></script>
    <style type="text/css">
        h4 {margin:0;}
        p {font: 9pt 宋体;}
        ul {list-style-type: none;font: 9pt 宋体;}
        ul li {display: inline;margin: 0 5px 0 0;font: 9pt 宋体;}
    </style>
</head>
<body>
<h4>vue.js中使用up7组件</h4>
<div id="demos"></div>
<!--ui-->
<div id="app">
    {{ message }}
    <!--上传面板-->
    <up7 ref="up7"
         :config="config.up7"
         @md5_complete="up7_md5_complete"
         @scan_complete="up7_scan_complete"
         @file_append="up7_file_append"
         @file_complete="up7_file_complete"
         @folder_complete="up7_folder_complete"
         @queue_complete="up7_queue_complete"
         @load_complete="up7_load_complete"
         @unsetup="up7_unsetup"
         @item_selected="up7_item_selected"></up7>
</div>
<script type="text/javascript">
    //根路径：http://localhost/api/up7/
    var pos = window.location.href.lastIndexOf("/");
    var api = [
        window.location.href.substr(0, pos + 1),
        "/"
    ].join("");

    var app = new Vue({
        el: '#app',
        data: {
            message: '演示up7如何在vue.js中使用',
            config: {
                //配置
                up7: {
                    License2: "",
                    //可扩展的业务逻辑字段
                    Fields: { uid: "0" },
                    //后端接口-文件夹
                    "UrlFdCreate": api + "fd_create",
                    "UrlFdComplete": api + "fd_complete",
                    "UrlFdDel": api + "fd_del",
                    //后端接口-文件
                    "UrlCreate": api + "f_create",
                    "UrlPost": api + "f_post",
                    "UrlNotice": api+"f_notice",
                    "UrlUpdate": api + "f_update",
                    "UrlComplete": api + "f_complete",
                    "UrlList": api + "f_list",
                    "UrlDel": api + "f_del"
                }
            }
        },
        mounted: function () { },
        methods: {
            //文件MD5验证完毕
            up7_md5_complete: function (obj, md5) { },
            //文件夹扫描完毕
            up7_scan_complete: function (obj) { },
            //文件添加
            up7_file_append: function (obj) { },
            //文件上传完毕
            up7_file_complete: function (obj) { },
            //文件夹上传完毕
            up7_folder_complete: function (obj) { },
            //控件加载完毕
            up7_load_complete: function () { },
            //队列上传完毕
            up7_queue_complete: function () { },
            //控件未安装
            up7_unsetup: function () { },
            //选择文件或目录
            up7_item_selected: function () { }
        }
    });
</script>
</body>
</html>